package book;

/**
 * Version: 1.1
 * Author: TangJun
 * Date: 2024-07-18
 */
public class BookList {
    private Book[] books = new Book[20];
    private int size;
    //书架，存放所有书籍
    public BookList() {
        this.books[0] = new Book("三国演义", "罗贯中", 90);
        this.books[1] = new Book("水浒传", "施耐庵", 70);
        this.books[2] = new Book("红楼梦", "曹雪芹", 80);
        this.size = 3;
    }

    public Book getPos(int x) {
        return books[x];
    }

    public void setPos(Book book, int x) {
        this.books[x] = book;
    }

    public Book[] getBooks() {
        return books;
    }

    public void setBooks(Book[] books) {
        this.books = books;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }
}
